<template>
  <view class="yContainerColumnCenter_h yMatch" style="background: #EEEEEE">
    <YNavBar title="模块首次加载" :canBack="false"/>
    <view class="yContainerRowCenter yMatch" :style="YNavBarContentStyle">
      <text>将在{{ time }}s后退出，请重新进入</text>
    </view>
  </view>
</template>

<script>
let $this, yFree, IJkid, IFinal;

export default {
  onBackPress: () => yFree.yFinishApplication(),
  data() {
    return {
      time: 5,
    }
  },
  onLoad(params) {
    $this = this, yFree = $this.yFree, IJkid = $this.IJkid, IFinal = $this.IFinal;
  },
  onReady() {
    let timer = yFree.yRunOnLoop(1000, () => {
      if ($this.time <= 0) {
        yFree.yFinishApplication();
        yFree.yStopRun(timer);
        return;
      }
      $this.time--;
    }, true);
  },
}
</script>

<style scoped>
</style>
